package org.coderk.mybatis.controller.user;

import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

import java.util.concurrent.TimeUnit;

/**
 * @author: TanJingyu
 * @create: 2021-06-29 14:34
 **/
@Component
public class UserComponent {

    @Async
    public void getName() throws InterruptedException {
        System.out.println(Thread.currentThread().getName());
        TimeUnit.SECONDS.sleep(10);
        System.out.println("getName.....");
    }
}
